#include "menu.h"

Menu::Menu()
{
    setLayout(new QVBoxLayout());
    setFixedWidth(200);

    vague.setText("Toutes sortes d'insectes");
    vague.setFixedHeight(42);
    lancerVague.setText("Lancer la vague");

    credit.setLayout(new QHBoxLayout);
    credit.layout()->addWidget(new QLabel("Crédits :"));
    credit.layout()->addWidget(&numCredits);
    credit.setFixedHeight(50);
    numCredits.display(26);

    vies.setLayout(new QHBoxLayout);
    vies.layout()->addWidget(new QLabel("Vies :"));
    vies.layout()->addWidget(&numVies);
    vies.setFixedHeight(50);
    numVies.display(9);

    defense.setTitle("Creer une defense :");
    defense.setLayout(new QGridLayout);

    eau.setText("eau");
    pierre.setText("pierre");
    peinture.setText("peinture");
    petanque.setText("petanque");
    musique.setText("musique");


    ((QGridLayout*)defense.layout())->addWidget(&eau,1,1,0);
    ((QGridLayout*)defense.layout())->addWidget(&pierre,1,2,0);
    ((QGridLayout*)defense.layout())->addWidget(&peinture,2,1,0);
    ((QGridLayout*)defense.layout())->addWidget(&petanque,2,2,0);
    ((QGridLayout*)defense.layout())->addWidget(&musique,3,1,0);

    pause.setText("Pause");

    info.setTitle("GroupBox :");
    info.setLayout(new QGridLayout);
    ((QGridLayout*)info.layout())->addWidget(&pause,1,1,0);

    layout()->addWidget(&vague);
    layout()->addWidget(&lancerVague);
    layout()->addWidget(&credit);
    layout()->addWidget(&vies);
    layout()->addWidget(&defense);
    layout()->addWidget(&info);
}
